#ifndef HANDLE_RESULT_MODEL
#define HANDLE_RESULT_MODEL

#include "POSIX_Semaphore.hpp"
#include "POSIX_SharedMemory.hpp"
#include <thread>
#include <functional>
#include <ImageType.hpp>
#include <pthread.h>

class HandleResultModel
{
  public:
    HandleResultModel();
    virtual ~HandleResultModel();
    void Boot(std::function<void(const ImageType& image)> func);
  private:
    pthread_t threadID;
    std::jthread workThread;
    POSIX_SharedMemory resultMemory;
    // POSIX_Semaphore sem;
    std::function<void(const ImageType & image)> funcResultCallback;
};

#endif
